Skip to content

CA-407687/XSI-1834: get_subject_information_from_identifier should #6344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

liulinC
Copy link
Collaborator

@liulinC liulinC commented Mar 7, 2025

query xapi db, then fallback to query domain DC

get_subject_information_from_identifier query subject details from subject id. It triggers some DNS query to do kerberos query, this causes the problem that authenticating to XAPI with an AD account causes large amounts of Kerberos / DNS traffic

The subject details are actually cached in xapi db and refreshed default in every 10 minutes. get_subject_information_from_identifier should query subject details from xapi DB and only fallback to DC when xapi DB does not have it.

@lindig
Copy link
Contributor

lindig commented Mar 7, 2025

Is there a danger that the information in xapi DB is outdated and we should have queried the AD but don't? How is the xapi DB kept up to date?

@liulinC
Copy link
Collaborator Author

liulinC commented Mar 7, 2025

queried

There is a background task to update such info default in 10 minutes.
If use is somehow locked in DB, we will goes to lookup AD.

This commit only affect the get_subject_information_from_identifier API (not affect login), which I do not worry much.

@liulinC liulinC force-pushed the private/linl/test-auth branch 2 times, most recently from 4947aa2 to 1a9159e Compare March 10, 2025 01:30
@liulinC liulinC force-pushed the private/linl/test-auth branch from 1a9159e to 91bc80d Compare March 10, 2025 06:24
query xapi db, then fallback to query domain DC

get_subject_information_from_identifier query subject details from
subject id. It triggers some DNS query to do kerberos query.

The subject details are actually cached in xapi db and refreshed
default in every 10 minutes. get_subject_information_from_identifier
should query subject details from xapi DB and only fallback to DC
when xapi DB does not have it.

Signed-off-by: Lin Liu <Lin.Liu01@cloud.com>
@liulinC liulinC force-pushed the private/linl/test-auth branch from 91bc80d to 76b46f6 Compare March 10, 2025 07:10
@liulinC liulinC added this pull request to the merge queue Mar 10, 2025
Merged via the queue into xapi-project:master with commit 76ad85f Mar 10, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants